#ifndef __DIALOG_H__
#define __DIALOG_H__

#include <vector>
#include <string>

#include "Object.h"
#include "Engine.h"
#include "Hud.h"

class DialogManager;
class Brain;

class Dialog {

 public:
	 Dialog(lua_State* L = NULL);
	 ~Dialog();

	 void playDialog(int idClue);
	 void stopDialog();

	 inline bool isDialogOver() {return m_bdialogOver;};

	 int addRequestDialog(lua_State* L);
	 int addClueDialog(lua_State* L);
	 int addFinalDialog(lua_State* L);

private:
	enum EDialogType {
		NONE,
		REQUEST,
		CLUE,
		FINAL
	};
	
	EDialogType m_edialogType;
	unsigned int m_currentDialog;
	bool m_bdialogOver;

	std::vector<std::string> m_vrequestDialogs;
	std::vector<std::string> m_vclueDialogs;
	std::vector<std::string> m_vfinalDialogs;

	// Script
	lua_State* m_pscript;
	friend class Lunar<Dialog>;
	static const char className[];
	static Lunar<Dialog>::RegType methods[];
};

#endif // __DIALOG_H__
